package org.ethan.practice;

/**
 * @ClassName: TestWhile
 * @Desc:
 * @Author: ethan
 * @CreateDate: 2019/10/14 17:55
 */
public class TestWhile {


   public static final int FLAG_ACTIVITY_NEW_TASK = 0x1000_0000;
   public static final int FLAG_ACTIVITY_SINGLE_TOP = 0x2000_0000;
   public static final int FLAG_ACTIVITY_MULTIPLE_TASK = 0x8000_0000;

    public static void main(String... args) {
//        System.out.println(FLAG_ACTIVITY_NEW_TASK);
//        System.out.println(FLAG_ACTIVITY_SINGLE_TOP);
//
//        int c = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_SINGLE_TOP | FLAG_ACTIVITY_MULTIPLE_TASK;
//        System.out.println( (c &  FLAG_ACTIVITY_MULTIPLE_TASK) == 0);

        //268435456
        //536870912
        //805306368    "| 意思 0 | 1 为 1，表现在运算是 +？"

//        System.out.println( (1 & 2) | 2 );
//        System.out.println(1 & (2 | 2));
//        System.out.println(2 | 2);
//        System.out.println(1 & 2);

//        boolean a = (2 & 2) == 2;
//        System.out.println(a);
//        int c = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_SINGLE_TOP ;
//        System.out.println("FLAG_ACTIVITY_NEW_TASK:"+FLAG_ACTIVITY_NEW_TASK);
//        System.out.println("FLAG_ACTIVITY_SINGLE_TOP:"+FLAG_ACTIVITY_SINGLE_TOP);
//        System.out.println("FLAG_ACTIVITY_MULTIPLE_TASK:"+FLAG_ACTIVITY_MULTIPLE_TASK);
//        System.out.println(c);
//        c = c & ~ FLAG_ACTIVITY_NEW_TASK;
//        System.out.println(~ FLAG_ACTIVITY_NEW_TASK);
//        System.out.println(c);

//        int w = 3,h = 4;
//        System.out.println(Math.hypot(w,h));

        int  a= 2,b = 3;
//        System.out.println(a & 1);
//        System.out.println(b & 1);
//        System.out.println(a & b);
//        System.out.println(b & a);

        System.out.println(3 & 4);
    }
}
